import request from '@/utils/request'
// import { from } from 'core-js/core/array'

// 获取地址列表
export const getAddressList = () => {
  return request.get('/address/list')
}

export const addAddress = () => {
  request.post('/address/add', {
    form: {
      name: 'su',
      phone: '18574268201',
      region: [
        {
          value: 782,
          label: '上海'
        },
        {
          value: 783,
          label: '上海市'
        },
        {
          value: 785,
          label: '徐汇区'
        }
      ],
      detail: '北京路1号楼8888室'
    }
  })
//   return request.post('/address/add', {
//     from: {
//       name: 'su',
//       phone: '18574268201',
//       region: [
//         { value: 782, label: '上海市' }
//       ]
//     }
//   })
}
